function [W, S, Z] = Qe(n)
%UNTITLED3 Summary of this function goes here
%   Detailed explanation goes here

oneCount = 0;
zeroCount = 0;
swapCount = 0;

for i = 1:n
   [tranmittedBit, recievedBit] = Qd;
   if recievedBit == 1
       oneCount = oneCount + 1;
   elseif recievedBit == 0
       zeroCount = zeroCount + 1;
 
   end
           
           
  
   if (tranmittedBit == 1 && recievedBit == 0)||(tranmittedBit == 0 && recievedBit == 1)
       swapCount = swapCount + 1;
   end
end

W = oneCount;
S = swapCount;
Z = zeroCount;